Some of the leaf atoms within the VR world and node information atom containers contain fields that specify the ID of string atoms that are siblings of the leaf atom. For example, the VR world header atom contains a field for the name of the scene. The string atom is a leaf atom whose atom type is kQTVRStringAtomType ('vrsg'). Its atom ID is that specified by the referring leaf atom.
A string atom contains a string. The structure of a string atom is defined by the VRStringAtom data type:
typedef struct VRStringAtom {
UInt16 stringUsage;
UInt16 stringLength;
unsigned char theString[4];
} VRStringAtom, *VRStringAtomPtr;
Each string atom may also have a sibling leaf atom called the string encoding atom. The string encoding atom's atom type is kQTVRStringEncodingAtomType ( 'vrse' ). Its atom ID is the same as that of the corresponding string atom. The string encoding atom contains a single variable, TextEncoding , a UInt32 , as defined in the header file TextCommon.h . The value of TextEncoding is handed, along with the string, to the routine QTTextToNativeText for conversion for display on the current machine. The routine QTTextToNativeText is found in the header file Movies.h.
The header file TextCommon.h contains constants and routines for generating and handling text encodings.
| Previous | Chapter Contents | Chapter Top | Next |